import request from '@/utils/request'
export function getAuthorityList() {
  return request({
    url: '/api/back/admin',
    method: 'get',
    params: { type: 'list' }
  })
}
// 权限管理----添加B端后台管理员
export function addAdministrator({ tenant_name, password, auth_rule_sell, mobile, position, realname	}) {
  return request({
    url: '/api/back/admin',
    method: 'post',
    data: { tenant_name, password, auth_rule_sell, mobile, position, realname	},
    params: { type: 'add' }
  })
}
export function editAdministrator({ password, auth_rule_sell, mobile, position, realname, id }) {
  return request({
    url: '/api/back/admin',
    method: 'post',
    data: { password, auth_rule_sell, mobile, position, realname, id },
    params: { type: 'save' }
  })
}
export function deleteAdmin(id) {
  return request({
    url: '/api/back/admin',
    method: 'post',
    data: { id },
    params: { type: 'delete' }
  })
}
// 获取用户信息
export function getAuthInfo(id) {
  return request({
    url: '/api/back/admin',
    method: 'get',
    params: { type: 'detail', id }
  })
}
